<!doctype html>
<html>

	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../css/mui.min.css" rel="stylesheet" />
		<link href="../css/icons-extra.css" rel="stylesheet" />
		<link rel="stylesheet" href="../css/base.css">
		<style type="text/css">
			.mui-content>.mui-table-view:first-child {
				margin-top: 0;
			}
		</style>
	</head>

	<body>

		<!-- 头部标题 -->
		<header class="mui-bar mui-bar-nav">
			<!-- <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a> -->
			<h1 class="mui-title">设置</h1>
		</header>

		<div class="mui-content">
			<ul class="mui-table-view">
				<li class="mui-table-view-cell" id="suggest">
					<a class="mui-navigate-right">
						意见反馈
					</a>
				</li>
				<li class="mui-table-view-cell" id="clearCache">
					<a class="mui-navigate-right">
						清除缓存
					</a>
				</li>
				<li class="mui-table-view-cell">
					<a class="mui-navigate-right">
						关于我们
					</a>
				</li>
			</ul>
		</div>



		<script src="../js/mui.min.js"></script>
		<script type="text/javascript">
			mui.init();
			// mui.init({
			//     subpages:[{
			//       url:your-subpage-url,//子页面HTML地址，支持本地地址和网络地址
			//       id:your-subpage-id,//子页面标志
			// 	  }]
			// 	  })
			// 在app开发中，若要使用HTML5+扩展api，必须等plusready事件发生后
			// 才能正常使用，mui将该事件封装成了mui.plusReady()
			mui.plusReady(function() {
				// 清除缓存，绑定点击事件
				// tap 手指触摸事件
				mui("#clearCache")[0].addEventListener("tap", function() {
					plus.storage.clear();
					plus.nativeUI.alert('缓存清除成功', function() {}, '提示', '我知道了');
					// // 选择日期
					// plus.nativeUI.pickDate(pickDate, function() {});
					// // 选择日期
					// function pickDate(e) {
					// 	var d = e.date;
					// 	console.log("选择的日期：" + d.getFullYear() + "-" + (d.getMonth() + 1) + "-" + d.getDate());
					// }
				})
				// 选择日期
				// plus.nativeUI.pickDate();

			})
			mui.plusReady(function() {
				let suggest
				suggest = plus.webview.getWebviewById("suggest"); //详细页的窗口对象
				if (!suggest) {
					suggest = mui.preload({ //预加载自动创建了窗口，加载了文件
						url: '../pages/subQue.html',
						id: "suggest" //这个也是webview的id

					})
				}
			})

			let suggestEle = document.getElementById("suggest");
			suggestEle.addEventListener("tap", function() {
				// console.log(1)
				mui.openWindow({ // 打开窗口之前
					url: '../pages/subQue.html',
					id: 'suggest'
				});
			})
		</script>
	</body>

</html>
